test of device is effective, don't set locals before return.
gps_errno = HARDWARE_ERROR;
return 0;
}
- dh = nullptr;
-
return 1;
}
usb_device_t **darwin_device;
- UInt32 location = *((UInt32 *)dev->device->dev);
- UInt32 dlocation;
-
if (!dev)
USB_ERROR(-ENXIO);
if ((result = usb_setup_iterator (&deviceIterator)) < 0)
return result;
+ UInt32 location = *((UInt32 *)dev->device->dev);
+ UInt32 dlocation;
+
+
/* This port of libusb uses locations to keep track of devices. */
while ((darwin_device = usb_get_next_device (deviceIterator, &dlocation)) != NULL) {
if (dlocation == location)